package com.yanqu.road.server.cmd.grandchild.patrons;

import com.yanqu.road.pb.grandchild.GrandChildProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.grandson.GrandChildModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_GRAND_CHILD_PATRONS_PUPIL,desc = "展示门客的门生")
public class ShowPatronsPupilCmd extends AbstractCommand {
    private int patronsId;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        GrandChildProto.PupilListReqMg req = GrandChildProto.PupilListReqMg.parseFrom(packet.getBytes());
        patronsId = req.getPatronsId();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(GrandChildModule.class).showPatronsPupil(patronsId);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
